-
-
Notifications
You must be signed in to change notification settings - Fork 617
feat(pypi): implement a new whl selection algorithm #3111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
0ed5c7d
to
9792058
Compare
didn't have time to review, but qq: does it still handle if multiple wheels are compatible? The type of case I have in mind are things that aren't represented by env markers. e.g. cuda version, free threading, etc. |
The main idea is that the user can specify the preference for the abi tags and the platform tags. If cuda version or the abi can be expressed by them, then it will work as expected. On top of this I could implement freethreaded support using this algorithm in #3063, so I am pretty confident that we have the right abstractions in place now, because the configuration of which wheel we should prefer is injected into the extension through the |
DO NOT MERGE: stacked on bazel-contrib#3110 This PR only implements the selection algorithm where instead of selecting all wheels that are compatible with the set of target platforms, we select a single wheel that is most specialized for a particular *single* target platform. What is more, compared to the existing algorithm it does not assume a particular list of supported platforms and just fully implements the spec. Work towards bazel-contrib#2747 Work towards bazel-contrib#2759 Work towards bazel-contrib#2849
5035cb6
to
b5d4900
Compare
Yeah, I get they can use bzlmod-phase stuff to control which implementations of a library are considered. Big +1 to that. The case I want to work is multiple implementations in a single build invocation. e.g. I'm guessing this PR does do that (since (1) that's what've talked of doing previous and (2) your mention of free-threading and the 3063 description makes it sound in that same vein) (but still haven't had a chance to review the code). But this PR description implies that, after bzlmod phase, only one wheel will be chosen? |
One wheel per target platform. So whatever your set of config settings you want to target are, there should be either 1 or 0 wheels matching that. |
This PR only implements the selection algorithm where instead of
selecting all wheels that are compatible with the set of target
platforms, we select a single wheel that is most specialized for a
particular single target platform.
What is more, compared to the existing algorithm it does not assume
a particular list of supported platforms and just fully implements the
spec.
Work towards #2747
Work towards #2759
Work towards #2849